package com.abso.sunlight.explorer;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import com.abso.sunlight.explorer.views.ExplorerView;

/**
 * A customized UI perspective for the Congress Explorer.
 */
public class SunlightPerspective implements IPerspectiveFactory {

    /** The perspective unique identifier. */
    public static final String ID = SunlightPerspective.class.getName();

    /*
     * (non-Javadoc)
     * 
     * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
     */
    public void createInitialLayout(IPageLayout layout) {
        String editorArea = layout.getEditorArea();
        layout.setEditorAreaVisible(true);
        IFolderLayout leftFolder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.35, editorArea);
        leftFolder.addView(ExplorerView.ID);
        layout.getViewLayout(ExplorerView.ID).setCloseable(false);
        IFolderLayout bottomFolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.50, editorArea);
        bottomFolder.addView("org.eclipse.pde.runtime.LogView");
    }

}
